/**
  ******************************************************************************
  * Copyright (C) 2020 - ~, SCUT-RobotLab Development Team
  * @file    state_Bounce.h
  * @author  ClangWU
  * @brief   Finite State Machine for jumping up.
  * @note    
  * @warning 
  *     - At least C++11 is required.														 
  ******************************************************************************
  */
#ifndef  _FSM_BOUNCE_H
#define  _FSM_BOUNCE_H
/* Includes ----------------------------------------------------------*/
#include "FSM.h"
/* Types Define ------------------------------------------------------*/
namespace Quadruped
{
  /**
 * @brief Class for bounce state.
 * 
 */
template <typename T>
class FSM_Bounce : public FSM_Base<T>
{
    public:
        FSM_Bounce( GaitScheduler<T> *p_gait,
                    StateEstimator<T> *p_estimator,
                    DesiredCoMState<T> *p_command,
                    Dynamic<T> *p_dynamic,
                    BalanceController<T> *p_controller,
                    T run_period);

    void RunState();
    int Transition(FSM_Base<T>* target_state);

    private:
    Dynamic<T> *p_Dynamic;
    DesiredCoMState<T>    *p_CoMCommand;
    StateEstimator<T>     *p_StateEstimator;
    GaitScheduler<T>      *p_GaitScheduler;
    BalanceController<T>  *p_BalanceController;
    Vec3<T> pBeforeBoundPos[4],pAfterBoundPos[4],pStandPos[4],pBoundJump[4],pRetractPos[4],pFallPos[4];
    Vec3<T> pDesiredFoot[4];
};

}



#endif // ! 

